home *** CD-ROM | disk | FTP | other *** search
/ Electronic Library of Art: Renaissance Masters / Electronic Library of Art - Renaissance Masters I (EBook)(ELARM1-92)(1992).ISO / setup.inf < prev    next >
Text File  |  1993-09-12  |  30KB  |  780 lines

  1. ;;SETUP.INF file for EBook Electronic Library of Art
  2. ;;this file is for the Renaissance I
  3. SetVariable(ProgPath,"C:\EBOOK")
  4. SetVariable(ProgName,"EBOOK2.EXE")
  5. SetVariable(InstallName, "Electronic Library of Art--Italian Renaissance Part 1")
  6. SetVariable(DataSpace,"1.7 Megabytes")
  7. SetVariable(ProgSpace,"700 Kilobytes")
  8. SetVariable(EbookSize, 700 000)
  9. SetVariable(DataSize, 1 700 000)
  10. SetVariable(TitleName,"EBook")
  11. SetVariable(IniName,"EBOOK.INI")
  12. GetCurPath (CurPath)
  13.  
  14. ; The following instructions are displayed several times so we put the
  15. ; text in a variable.
  16. ;
  17. SetVariable (InsAskPath,
  18.     "Modify the default path if necessary, and then click on {\b OK} or "
  19.     "press {\b Enter} to continue.  ")
  20. SetVariable (InsBadPath,
  21.     "The path is currently not valid.  You must specify a drive "
  22.     "letter, a colon, and a directory from the root of the drive.  ")
  23.  
  24. ; Set the title of all dialog windows.
  25. ;
  26. WindowTitle (<InstallName>" Setup")
  27.  
  28. ; Set the instruction text used in the initial instructions window.
  29. ; Add Help instructions if the file SETUP.HLP exists.
  30. ;
  31. SetVariable (InitialInstructions, 
  32.     "Click on {\b OK} or press {\b Enter} to continue.  "
  33.     "To abort the setup, click on the {\b Exit} button at the "
  34.     "bottom right corner of the screen, or press {\b F3}.  ")
  35. IfFileExistsGoto ("SETUP.HLP", AddHelpInstructions)
  36.     Goto (DisplayInitialMessage)
  37. AddHelpInstructions:
  38.     SetVariable (InitialInstructions, 
  39.         <InitialInstructions> "You can always obtain help by "
  40.         "clicking on the {\b Help} button or pressing {\b F1}.  ")
  41.  
  42. ; Display the initial message.
  43. ;
  44. DisplayInitialMessage:
  45. DisplayMessage (
  46. "The Setup program will install the " <InstallName> " on your hard disk."
  47. "  There are two options available for installation:%n%n"
  48.  
  49. "Run " <InstallName> " Entirely off of the CD-ROM.%n%n"
  50. "Copy " <ProgName> " to your Hard Disk to improve execution speed.%n%n",
  51. <InitialInstructions>)
  52.  
  53. ;ask if user wants to copy the ebook files to hard disk
  54. AskYesNo (Prompt, "Yes",
  55.     "The " <TitleName> " files require about " <ProgSpace> " of disk "
  56.     "space.  Would you like to copy them to your hard disk?",
  57.     <TitleName> " Can be run from the CD-ROM, but copying it to your "
  58.     "Hard disk will improve execution speed.\par\par"
  59.     "Click on {\b Yes} or press {\b 'Y'} to copy the " <TitleName> 
  60.     " files.\par "
  61.     "Click on {\b No} or press {\b 'N'} to proceed without copying the "
  62.     <TitleName> " source files.")
  63. IfEqualGoto (<Prompt>, "No", DontPromptTitlePath)
  64.  
  65.  
  66.  
  67.  
  68. AskAgain:
  69.  
  70.  
  71. ; Ask for where the Ebook files should be installed.
  72. ;
  73. PromptEbookPath:
  74. PromptPath (ProgPath, <ProgPath>,
  75.     "Where should Setup install the EBook files?",
  76.     <InsAskPath>, <InsBadPath>)
  77.  
  78.  
  79. ; Don't allow Ebook to be installed in the Windows directory
  80. ;
  81. GetWinPath (WinPath)
  82. GetWinSystemPath (SystemPath)
  83. IfNotEqualGoto (<ProgPath>, <WinPath>, CheckSpace)
  84. DisplayMessage (
  85.     "You cannot install EBook into the Windows directory.  "
  86.     "Please enter another directory.",
  87.     "Click on {\b OK} or press {\b Enter} to enter another directory "
  88.     "for EBook.")
  89. Goto (PromptEbookPath)
  90.  
  91. ; Check if there is enough space to install the EBook files.
  92. ;
  93. CheckSpace:
  94. GetSpaceAvailable (SpaceAvailable, <ProgPath>)
  95. IfLowerGoto (<EbookSize>, <SpaceAvailable>, EbookPathOK)
  96. AskYesNo (Prompt, "Yes",
  97.     "There may not be enough space to install the "<InstallName>" Files."
  98.     "  Would you like to enter a new path for the files?  ",
  99.     "Click on {\b Yes} or press {\b 'Y'} to enter a new path for the "
  100.     "Ebook files.\par "
  101.     "Click on {\b No} or press {\b 'N'} to continue anyway.\par "
  102.     "Click on the {\b Exit} button or press {\b F3} to exit Setup.  "
  103.     "You may wish to exit Setup and make some more space on your hard "
  104.     "disk.  Run Setup again when there is enough space on your hard "
  105.     "disk.  ")
  106. IfEqualGoto (<Prompt>, "Yes", PromptEbookPath)
  107.  
  108. EbookPathOK:
  109. ;create the subdirectory
  110. MakePath(<ProgPath>)
  111. ;copy the ebook files
  112. OpenCopyProgress(
  113.     "Setup is copying the "<InstallName> " Program files.",
  114.     "Please wait while Setup is copying files.")
  115.  
  116. CopyFile("EBOOK2.EXE",<ProgPath> "EBOOK2.EXE", 250000)
  117. CopyFile("TITLE.DIB",<ProgPath> "TITLE.DIB", 93000)
  118. CopyFile("TITLE.WAV",<ProgPath> "TITLE.WAV", 180000)
  119. CopyFile("EBOOK2.HLP",<ProgPath> "EBOOK2.HLP",50000)
  120.  
  121. CloseCopyProgress()
  122.  
  123.  
  124.  
  125.  
  126.  
  127. SetVariable(DataPath,<CurPath>"DATA")
  128. GoTo(EbookCopied)
  129. DontPromptTitlePath:
  130. SetVariable(DataPath,<CurPath>"DATA")
  131. SetVariable(ProgPath,<CurPath>)
  132. GoTo(EbookNotCopied)
  133.  
  134. EbookCopied:
  135. SetVariable(ProgPath,<ProgPath>)
  136. EbookNotCopied:
  137.  
  138. ;copy the ebook.ini file and add the paths
  139. AddToProfileIni(<IniName>,"PATHS","CDROM",<CurPath>)
  140. AddToProfileIni(<IniName>,"PATHS","PICTURE",<CurPath>"PIX")
  141. AddToProfileIni(<IniName>,"PATHS","DATA",<CurPath>"DATA")
  142. AddToProfileIni(<IniName>,"PATHS","INDEX",<CurPath>"DATA")
  143. AddToProfileIni(<IniName>,"PATHS","PSTAMPPATH",<CurPath>"DATA")
  144. AddToProfileIni(<IniName>,"PATHS","MIDIPATH",<CurPath>"MIDI")
  145.  
  146. ;add the info for this title to ebook.ini
  147. AddToProfileIni(<IniName>,"ELAVOL2","Title","Electronic Library of Art, Volume 2-The Italian Renaissance Part I")
  148. AddToProfileIni(<IniName>,"ELAVOL2","Card","WINCARD2")
  149. AddToProfileIni(<IniName>,"ELAVOL2","NumberIndex","6")
  150. AddToProfileIni(<IniName>,"ELAVOL2","IndexNames","ARTIST2,TITLE2,MEDIUM2,DATE2,OBJ2,CSCHOOL2");
  151. AddToProfileIni(<IniName>,"ELAVOL2","IndexTitles","Artist,Title,Medium,Date,Object,School");
  152. AddToProfileIni(<IniName>,"ELAVOL2","PStamp","1")
  153. AddToProfileIni(<IniName>,"ELAVOL2","BrowseMode","0")
  154. AddToProfileIni(<IniName>,"ELAVOL2","NumberPixColumns","5")
  155. AddToProfileIni(<IniName>,"ELAVOL2","NumberPixRows","3")
  156. AddToProfileIni(<IniName>,"ELAVOL2","NumberMIDI","4")
  157. AddToProfileIni(<IniName>,"ELAVOL2","MidiFiles","PRIMAVER,PROFUMIE,LASIRENA,CANTENA")
  158. AddToProfileIni(<IniName>,"ELAVOL2","MidiTitles","Ecco la Primavera,Canto de'Profumieri,Balletto la Sirena,La Cantena D'Amore")
  159.  
  160.  
  161.  
  162.  
  163. ;cleanup
  164.  
  165. IfIncompleteGoto(NotInstalled)
  166.  
  167. Installed:
  168.     SetVariable (Message, 
  169.         "The Setup program has successfully installed the "
  170.         <TitleName> ".%n%n")
  171.  
  172.  
  173.  
  174. GetCurPath (ViewerSrcDir)        ; Source directory of the Viewer
  175. SetVariable (ViewerSize, 1 000 000)    ; Size of the Viewer files that will
  176.                     ;  be copied over (measured in bytes)
  177. SetVariable (ViewerDestDir, "C:\VIEWER\")    ; Destination directory for 
  178.                         ;  the Viewer.  Set default
  179.                         ;  here.
  180.  
  181.     ;;*************Begin Title Specific Section***************************
  182.  
  183.     ;;
  184.     ;; SetVariable (Variable, String)
  185.     ;; ------------------------------
  186.     ;; This command sets the variable named 'Variable' to the string
  187.     ;; 'String'.
  188.     ;;
  189.  
  190.     ;;     Change this variable to be the name of the title.
  191.     ;;
  192. SetVariable (TitleName, "Renaissance Essay")    ; Name of the title
  193.  
  194.     ;;    Change this variable to be the basename of the title's MVB
  195.     ;;    file (i.e. the name of the MVB file without the .MVB 
  196.     ;;    extension).
  197.     ;;
  198. SetVariable (TitleMVB, "ARTBOOK")        ; Basename of the MVB file
  199.  
  200.     ;;    Change this variable to be the subdirectory of the title
  201.     ;;    on the CD-ROM (i.e. where the MVB file is located).  This 
  202.     ;;    subdirectory will be in the Viewer directory on the CD-ROM,
  203.     ;;    where VIEWER.EXE and SETUP.EXE are located.  Do not specify
  204.     ;;    the complete path for this subdirectory.
  205.     ;;
  206. SetVariable (TitleSrcDir, "\ESSAY\")    ; Source subdirectory of the title
  207.  
  208.     ;;***************End Title Specific Section***************************
  209.  
  210.     ;;
  211.     ;; GetCurPath (Variable)
  212.     ;; ---------------------
  213.     ;; This command sets the variable 'Variable' to the current path.
  214.     ;; This is the full path of the directory in which SETUP.EXE was 
  215.     ;; started.  A directory name ends in a backslash.
  216.     ;;
  217. DisplayInitialMessage:
  218. DisplayMessage (
  219.     "
  220.         
  221.     This Setup program will install:
  222.     
  223.     The Renaissance in Italy, an Essay,
  224.  
  225.     and the Multimedia Viewer.
  226.         
  227.     
  228.     You will be prompted for the location for the
  229.     Multimedia Viewer. This will require about 1
  230.     Megabyte of disk space.",
  231.     <InitialInstructions>)
  232.  
  233.     ;;
  234.     ;; GetFromWinIni (Variable, Section, Name, Default)
  235.     ;; ------------------------------------------------
  236.     ;; This command reads the WIN.INI file entry 'Name' under the section
  237.     ;; 'Section' and sets the variable 'Variable' to the result.  If the
  238.     ;; specified section or entry were not found, then the specified 
  239.     ;; variable is set to the string 'Default'.
  240.     ;;
  241.  
  242. ; Determine if the Viewer has been installed before.
  243. ; If the WIN.INI file contains information on where the Viewer directory
  244. ; is located, then make that the default path to install the Viewer.
  245. ;
  246. GetFromWinIni (ViewerDestDirTemp, 
  247.     "Multimedia Viewer", "ViewerPath", "Undefined")
  248.  
  249.     ;;
  250.     ;; IfEqualGoto (String1, String2, Label)
  251.     ;; -------------------------------------
  252.     ;; This command will do a case insensitive compare on the strings
  253.     ;; 'String1' and 'String2' and branch to label 'Label' if they match.
  254.     ;;
  255.  
  256. IfEqualGoto (<ViewerDestDirTemp>, "Undefined", PromptViewerDestDir)
  257. SetVariable (ViewerDestDir, <ViewerDestDirTemp>)
  258.  
  259.  
  260. AskAgain2:
  261.  
  262.     ;;
  263.     ;; PromptPath (Variable, Default, Message, ValidInstructions,
  264.     ;;        InvalidInstructions)
  265.     ;; ----------------------------------------------------------
  266.     ;; This command causes a dialog box to appear that prompts the user 
  267.     ;; for a path.  The path is a directory that the setup script can use
  268.     ;; to copy into, make, etc.  The message 'Message' is shown at the top
  269.     ;; of the dialog, and the default path is 'Default'.   When PromptPath
  270.     ;; is invoked, Setup checks that the default specified in the INF file
  271.     ;; is a valid path on the user's machine. 
  272.     ;;
  273.     ;; The PromptPath dialog can be in two states.  Whenever the edit box
  274.     ;; contains a valid path, the OK button is available and the 
  275.     ;; 'ValidInstructions' text is displayed in the instruction window.
  276.     ;; Whenever the edit box contains an invalid path, the OK button is
  277.     ;; grayed out and the 'InvalidInstructions' text is displayed in the
  278.     ;; instruction window.
  279.     ;;
  280.     ;; All characters typed in the path edit box appear as upper case no
  281.     ;; matter what the keyboard shift state is in.  When the OK button is
  282.     ;; enabled, the user can click on the OK button or press Enter, upon
  283.     ;; which the path is placed in the variable 'Variable'.  Before
  284.     ;; returning the path however, PromptPath will translate all forward
  285.     ;; slashes to back slashes and ensure that the path ends in a
  286.     ;; back slash.
  287.     ;;
  288.  
  289. ; Ask for where the Multimedia Viewer should be installed.
  290. ;
  291. PromptViewerDestDir:
  292. PromptPath (ViewerDestDir, <ViewerDestDir>,
  293.     "Where should Setup install the Multimedia Viewer?",
  294.     "Modify the default path if necessary, and then click on {\b OK} or "
  295.     "press {\b Enter} to continue.  ",
  296.     "The path is currently not valid.  You must specify a drive "
  297.     "letter, a colon, and a directory from the root of the drive.  ")
  298.  
  299.     ;;
  300.     ;; GetWinPath (Variable)
  301.     ;; ---------------------
  302.     ;; This command sets the variable 'Variable' to the path of the
  303.     ;; Windows directory.  The directory name ends in a backslash.
  304.     ;;
  305.     ;;
  306.  
  307. ; Don't allow Viewer to be installed in the Windows directory
  308. ;
  309. GetWinSystemPath (SystemPath)
  310. GetWinPath (WinPath)
  311. IfNotEqualGoto (<ViewerDestDir>, <WinPath>, CheckSpace2)
  312. DisplayMessage (
  313.     "You cannot install the Viewer into the Windows directory.  "
  314.     "Please enter another directory.",
  315.     "Click on {\b OK} or press {\b Enter} to enter another directory "
  316.     "for Viewer.")
  317. Goto (PromptViewerDestDir)
  318.  
  319.     ;;
  320.     ;; GetSpaceAvailable (Variable, Path)
  321.     ;; ----------------------------------
  322.     ;; This command finds the number of bytes available on the disk of 
  323.     ;; the full path 'Path', and sets the variable 'Variable' to the 
  324.     ;; string representation of this value.  The value 0 is returned if
  325.     ;; the specified volume does not exist or cannot be read.
  326.     ;;
  327.  
  328. ; Check if there is enough space to install the Viewer.
  329. ;
  330. CheckSpace2:
  331. GetSpaceAvailable (SpaceAvailable, <ViewerDestDir>)
  332.  
  333.     ;;
  334.     ;; IfLowerGoto (Number1, Number2, Label)
  335.     ;; -------------------------------------
  336.     ;; This command will compare 'Number1' and 'Number2', which are 
  337.     ;; strings interpreted as integers.  If 'Number1' is lower than 
  338.     ;; 'Number2' then execution branches to 'Label'.
  339.     ;;
  340.  
  341. IfLowerGoto (<ViewerSize>, <SpaceAvailable>, ViewerDestDirOK)
  342.  
  343.     ;;
  344.     ;; AskYesNo (Variable, Default, Question, Instructions)
  345.     ;; ----------------------------------------------------
  346.     ;; This command displays the string 'Question' in a dialog box and the
  347.     ;; instruction text 'Instructions' in the instruction window.  The
  348.     ;; dialog box has two buttons, labeled "Yes" and "No".  The string
  349.     ;; 'Default' should be either "Yes" or "No" to specify which button is
  350.     ;; the default button.  After a button is pushed, the variable
  351.     ;; 'Variable' is set to the string "Yes" or the string "No" as
  352.     ;; appropriate.
  353.     ;;
  354.  
  355. AskYesNo (Prompt, "Yes",
  356.     "There may not be enough space to install the Multimedia Viewer.  "
  357.     "Would you like to enter a new path for the files?  ",
  358.     "Click on {\b Yes} or press {\b 'Y'} to enter a new path for the "
  359.     "Multimedia Viewer files.\par "
  360.     "Click on {\b No} or press {\b 'N'} to continue anyway.\par "
  361.     "Click on the {\b Exit} button or press {\b F3} to exit Setup.  "
  362.     "You may wish to exit Setup and make some more space on your hard "
  363.     "disk.  Run Setup again when there is enough space on your hard "
  364.     "disk.  ")
  365. IfEqualGoto (<Prompt>, "Yes", PromptViewerDestDir)
  366.  
  367.  
  368. ViewerDestDirOK:
  369. AskYesNo (AskAgain, "No", 
  370.     "Would you like to change anything before proceeding with "
  371.     "the installation?",
  372.     "Click on {\b Yes} or press {\b 'Y'} to reenter options.\par "
  373.     "Click on {\b No} or press {\b 'N'} to proceed with installation.  ")
  374. IfEqualGoto (<AskAgain>, "Yes", AskAgain2)
  375.  
  376.     ;;
  377.     ;; MakePath (Path)
  378.     ;; ---------------
  379.     ;; This command causes the path 'Path' to be created if it does not
  380.     ;; already exist.  To make the path, MakePath creates any
  381.     ;; subdirectories that do not already exist.  If the path cannot be
  382.     ;; created, then no error will be reported, as the problem will
  383.     ;; normally be detected when Setup attempts to copy files to this
  384.     ;; path.
  385.     ;;
  386.  
  387. ; Create the tree structure.
  388. ;
  389. MakePath (<ViewerDestDir>)
  390.  
  391.     ;;
  392.     ;; OpenCopyProgress (Message, Instructions)
  393.     ;; ----------------------------------------
  394.     ;; This command begins a file manipulation section.  The command will
  395.     ;; open a progress bar dialog with the message 'Message' and the
  396.     ;; instruction text 'Instructions'.  Following this command, only the
  397.     ;; commands 'SetProgressBarMsg', 'PromptChangeDisk', 'CopyFile',
  398.     ;; 'AppendFile', 'UpdateFile', 'TranslateFile', 'DeleteFile', 
  399.     ;; 'RenameFile', 'Goto', 'IfEqualGoto', 'IfNotEqualGoto', 'ErrorExit',
  400.     ;; 'IfLowerGoto', 'IfHigherGoto', 'IfFileExistsGoto', 'Pause', and
  401.     ;; 'MakePath' are allowed until the 'CloseCopyProgress' command is
  402.     ;; reached.  An error is reported and Setup is aborted if any other
  403.     ;; commands are encountered while the progress bar is displayed.
  404.     ;;
  405.  
  406. ; Copy the files
  407. ;
  408. OpenCopyProgress(
  409.     "Setup is copying the Multimedia Viewer runtime files.",
  410.     "Please wait while Setup is copying files.")
  411.  
  412.     ;;
  413.     ;; CopyFile (Source, Destination, Size)
  414.     ;; ------------------------------------
  415.     ;; This command copies the file 'Source' to the file 'Destination'.
  416.     ;; The current disk and directory will be that of the Setup 
  417.     ;; executable.  Normally the files to copy will be in the same place
  418.     ;; (although a volume change may be required---see PromptChangeDisk)
  419.     ;; so a relative path is normally used for the source file name.
  420.     ;; Normally variables are used to specify a complete destination file
  421.     ;; name that depends on the user's path selection.  Any directories 
  422.     ;; specified in the destination path must already exist---they are
  423.     ;; normally created using the MakePath commands. 
  424.     ;;
  425.     ;; The 'Size' field specifies the size of the source file.  In order
  426.     ;; to initialize the progress bar it is necessary to find the total
  427.     ;; number of bytes to copy between the OpenCopyProgress command and
  428.     ;; the CloseCopyProgress command.  Since files may span several disks,
  429.     ;; it would be impractical to obtain this size directly from the 
  430.     ;; source file.  The size field is only required to maintain the
  431.     ;; progress bar, and, although it need not be exact, it should be
  432.     ;; close to reality to maintain the accuracy of the progress bar.
  433.     ;;
  434.     ;; If an error occurs (such as File Not Found, Read Error, Write 
  435.     ;; Error) then an error dialog is shown, at which point the user has
  436.     ;; the option to Abort Setup, Retry the copy operation, or Ignore the
  437.     ;; copy error.  Selecting Abort has the same effect as pressing <F3>. 
  438.     ;; Selecting Retry causes the operation to be retried.  Finally,
  439.     ;; selecting Ignore causes copying to continue despite the error.  The
  440.     ;; latter option will likely result in an incomplete Setup.  The
  441.     ;; command 'IfIncompleteGoto' can be used subsequently to give the 
  442.     ;; user an appropriate message.
  443.     ;;
  444.     ;; Files compressed using the Windows SDK COMPRESS utility will 
  445.     ;; automatically be decompressed as they are being copied to the hard
  446.     ;; disk. 
  447.     ;;
  448.  
  449. CopyFile ("FTENGINE.DLL", <ViewerDestDir> "FTENGINE.DLL",  50000)
  450. CopyFile ("FTUI.DLL",     <ViewerDestDir> "FTUI.DLL",      75000)
  451. CopyFile ("MMP.DLL",      <ViewerDestDir> "MMP.DLL",      200000)
  452. CopyFile ("MVAFF.DLL",    <ViewerDestDir> "MVAFF.DLL",     50000)
  453. CopyFile ("MVAPI.DLL",    <ViewerDestDir> "MVAPI.DLL",     10000)
  454. CopyFile ("MVAUDDLG.DLL", <ViewerDestDir> "MVAUDDLG.DLL",  50000)
  455. CopyFile ("MVAUDIO.DLL",  <ViewerDestDir> "MVAUDIO.DLL",   10000)
  456. CopyFile ("MVBMP.DLL",    <ViewerDestDir> "MVBMP.DLL",     50000)
  457. CopyFile ("QKHOOK.DLL",   <ViewerDestDir> "QKHOOK.DLL",    10000)
  458. CopyFile ("QUICKEYS.EXE", <ViewerDestDir> "QUICKEYS.EXE",  25000)
  459. CopyFile ("VIEWER.EXE",   <ViewerDestDir> "VIEWER.EXE",   250000)
  460. CopyFile ("DISPDIB.DLL",  <SystemPath>    "DISPDIB.DLL",   10000)
  461. CopyFile ("VER.DLL",      <SystemPath>    "VER.DLL",       80000)
  462. CopyFile ("QUICKEYS.HLP", <ViewerDestDir> "QUICKEYS.HLP",  25000)
  463.  
  464. CloseCopyProgress ()
  465.  
  466.     ;;*************Begin Title Specific Section***************************
  467.  
  468.     ;;
  469.     ;; SetVariable (Variable, String)
  470.     ;; ------------------------------
  471.     ;; This command sets the variable named 'Variable' to the string
  472.     ;; 'String'.
  473.     ;;
  474.  
  475.  
  476.     ;;***************End Title Specific Section***************************
  477.  
  478.     ;;
  479.     ;; GetCurPath (Variable)
  480.     ;; ---------------------
  481.     ;; This command sets the variable 'Variable' to the current path.
  482.     ;; This is the full path of the directory in which SETUP.EXE was 
  483.     ;; started.  A directory name ends in a backslash.
  484.     ;;
  485.  
  486.     ;;
  487.     ;; CloseCopyProgress ()
  488.     ;; --------------------
  489.     ;; This command closes the copy progress bar.
  490.     ;;
  491.  
  492.  
  493.     ;;*************Begin Title Specific Section***************************
  494.  
  495. ;;
  496.     ;; OpenProgmanProgress (Message, Instructions)
  497.     ;; -------------------------------------------
  498.     ;; This command begins a Program Manager installation section.
  499.     ;; This command will put up a progress bar with the message 'Message'
  500.     ;; and the instructions 'Instructions'.  Following this command, only
  501.     ;; the commands 'SetProgressBarMsg', 'OpenProgmanGroup', 'ErrorExit',
  502.     ;; 'AddProgmanItem', 'Goto', 'IfEqualGoto', 'IfNotEqualGoto',
  503.     ;; 'IfLowerGoto', 'IfHigherGoto', 'IfFileExistsGoto', and 'Pause' are
  504.     ;; allowed until the 'CloseProgmanProgress' command is reached.  An
  505.     ;; error is reported and Setup is aborted if any other commands are
  506.     ;; encountered while the progress bar is displayed.
  507.     ;;
  508.  
  509. ; Begin adding Progam Manager groups
  510. ;
  511.     ;;
  512.     ;; OpenProgmanGroup (Group[,  DeleteFlag])
  513.     ;; ---------------------------------------
  514.     ;; This command will set up a DDE conversation with the Program 
  515.     ;; Manager and open the program group entitled 'Group'.  If the 
  516.     ;; optional string 'Delete' is specified and is equal to "Delete", 
  517.     ;; then the specified group will be deleted if it exists, before it is
  518.     ;; created.  Normally this Delete flag is specified to create a new 
  519.     ;; program group, and is omitted to add to an existing group. 
  520.     ;; 
  521.     ;; The progress bar will display the words "Opening" followed by the
  522.     ;; name of the ProgMan group.  If OpenProgmanGroup fails then no error
  523.     ;; is reported.
  524.     ;;
  525.  
  526. ; Add a specific Program Manager group.
  527. ;
  528. ;OpenProgmanGroup (<TitleName>, Delete)    ;; Add the group named after the title
  529.  
  530.     ;;
  531.     ;; AddProgmanItem (Item, Command, IconFile, IconNumber)
  532.     ;; ----------------------------------------------------
  533.     ;; This command will add a new icon to the Program Manager group 
  534.     ;; opened by OpenProgmanGroup.  The icon will have the title 'Item',
  535.     ;; the command string 'Command', the icon file 'IconFile' and the
  536.     ;; 0-based icon index within the icon file 'IconNumber'.  Variables
  537.     ;; can be used to specify a complete path for the command and icon
  538.     ;; files that are dependent on the user's path choices.
  539.     ;;
  540.     ;; The progress bar will display the words "Adding" followed by the 
  541.     ;; item name.  If AddProgramItem fails then no error is reported.
  542.     ;;
  543. ;add the program group
  544. OpenProgManProgress("Setup is adding a Program Manager Group for Ebook",
  545.     "Please wait while Setup adds the Group")
  546. OpenProgManGroup("Ebook")
  547. AddProgManItem("ELA Renaissance Part I",<ProgPath>"EBOOK2.EXE ELAVOL2",
  548.   <ProgPath>"EBOOK2.EXE" ,0)
  549.  
  550. ;AddProgmanItem (<TitleName>,
  551. ;    <ViewerDestDir> "VIEWER.EXE " <ViewerSrcDir>"ESSAY\"<TitleMVB> ".MVB",
  552. ;    <ViewerSrcDir>
  553. ;        "ESSAY\EBOOK.ICO",    ;; Change this to be the icon (ICO)
  554. ;;                    ;;  file for the title.
  555. ;    0)
  556.  
  557.     ;;
  558.     ;; CloseProgmanProgress ()
  559.     ;; -----------------------
  560.     ;; This command closes the ProgMan DDE conversation.
  561.     ;;
  562.  
  563. CloseProgmanProgress ()
  564.  
  565. AddToProfileIni(<IniName>,"ELAVOL2","Essay","VIEWER.EXE " <ViewerSrcDir>"ESSAY\"<TitleMVB>".MVB")
  566.  
  567.  
  568.     ;;
  569.     ;; AddToProfileIni (File, Tag, Name, Value)
  570.     ;; ----------------------------------------
  571.     ;; This command is identical to AddToWinIni, except that any profile
  572.     ;; file can be used.  This can be used to access the SYSTEM.INI file
  573.     ;; and any other private profile files.  No error is reported if this
  574.     ;; operation fails.
  575.     ;;
  576.  
  577. ; Update VIEWER.INI.
  578. ;
  579. AddToProfileIni ("VIEWER.INI", <TitleMVB>, "Path", 
  580.     <ViewerSrcDir> <TitleSrcDir>)
  581. AddToProfileIni ("VIEWER.INI", "Files", <TitleMVB> ".MVB", 
  582.     <ViewerSrcDir> <TitleSrcDir>
  583.     ",Please insert the " <TitleName> " CD in the CD-ROM drive")
  584.  
  585.     ;;    For each of the other books in a multiple-book title, add
  586.     ;;    a VIEWER.INI section that is named after the basename of
  587.     ;;    that book's MVB file (which should be in the same directory
  588.     ;;    as the main title's MVB file).
  589.     ;;
  590. AddToProfileIni ("VIEWER.INI", 
  591.     "AESOP",        ; Basename of the MVB file
  592.     "Path", <ViewerSrcDir> <TitleSrcDir>)
  593.  
  594.     ;;***************End Title Specific Section***************************
  595.  
  596.     ;;
  597.     ;; AddToWinIni (Tag, Name, Value)
  598.     ;; ------------------------------
  599.     ;; This command adds or modifies the WIN.INI file entry 'Name' under
  600.     ;; the tag 'Tag' to equal the string 'Value'.  No error is reported if
  601.     ;; this operation fails.
  602.     ;;
  603.  
  604. ; Update WIN.INI.
  605. ;
  606. AddToWinIni ("Multimedia Viewer", "ViewerPath", <ViewerDestDir>)
  607. AddToWinIni ("Extensions", "mvb", "viewer.exe ^.mvb")
  608.  
  609.  
  610.     ;;
  611.     ;; ModifyAutoexec (Path, Lib, Include, AskInstructions, 
  612.     ;;        ReviewInstructions, SaveInstructions)
  613.     ;; ----------------------------------------------------
  614.     ;; This command ensures that the following environment variables in
  615.     ;; the AUTOEXEC.BAT file are set:
  616.     ;;
  617.     ;;    1. the path 'Path' is present in the PATH variable
  618.     ;;    2. the path 'Lib' is present in the LIB variable
  619.     ;;    3. the path 'Include' is present in the INCLUDE variable
  620.     ;; 
  621.     ;; If any of  'Path', 'Lib', or 'Include' is the null string (""),
  622.     ;; then the corresponding environment variable is ignored.
  623.     ;;
  624.     ;; If an environment variable needs to be changed, a dialog window
  625.     ;; is brought up.  If all the required paths are already in the
  626.     ;; current environment variables, then no dialog is shown.  The
  627.     ;; instruction window contains the instruction text 'AskInstructions'.
  628.     ;;
  629.     ;; If the default option to make the modifications is selected, then
  630.     ;; the old AUTOEXEC.BAT file is saved to AUTOEXEC.BAK and the required
  631.     ;; changes are made to the current AUTOEXEC.BAT file.  Paths are added
  632.     ;; to the beginning of the path list in the PATH, SET LIB, and
  633.     ;; SET INCLUDE statements.   If the statement to set the appropriate
  634.     ;; environment variable is not present then the statement is added to
  635.     ;; the end of the AUTOEXEC.BAT file.  If the AUTOEXEC.BAT file is not
  636.     ;; found, then a new AUTOEXEC.BAT file is created to contain these
  637.     ;; new statements.
  638.     ;;
  639.     ;; If the option to review and edit the changes is chosen then the
  640.     ;; following dialog is shown:
  641.     ;;
  642.     ;; The upper edit box shows the proposed changes to the AUTOEXEC.BAT
  643.     ;; file and the lower edit box shows the current AUTOEXEC.BAT file
  644.     ;; contents.  The instruction window shows the instructon text
  645.     ;; 'ReviewInstructions'.   Any changes made to the upper edit box are
  646.     ;; saved when the user clicks on the OK default button or presses
  647.     ;; <Enter> to save the changes.  The old AUTOEXEC.BAT is saved to the
  648.     ;; file AUTOEXEC.BAK before the changes are made.  The Cancel button
  649.     ;; brings back the previous dialog.
  650.     ;;
  651.     ;; If the option to make the modifications later is chosen then the
  652.     ;; following dialog is shown:
  653.     ;;
  654.     ;; Here the user can specify a file that will contain the
  655.     ;; modifications made to the AUTOEXEC.BAT file.  The instruction
  656.     ;; window shows the instruction text 'SaveInstructions'.  The default
  657.     ;; filename is AUTOEXEC.NEW, but the user can changes this by editing
  658.     ;; the file in the dialog box.  To save the changes to the specified
  659.     ;; file, the user clicks on the Save button or presses 'S' or Enter.
  660.     ;; To not save the changes, the user clicks on the Don't Save button.
  661.     ;; To return to the previous dialog, the user clicks on the Cancel
  662.     ;; button or presses Esc.
  663.     ;;
  664.  
  665. ; Add the Viewer path to the PATH variable in the environment.
  666. ;
  667. ModifyAutoexec (<ViewerDestDir>, "", "",
  668.     "Setup must now make some changes to your {\b AUTOEXEC.BAT} file.  "
  669.     "Click on the desired option and click on {\b OK} to continue.  With "
  670.     "the keyboard, use the arrow keys to select the desired option, and "
  671.     "then press {\b Enter} to continue.\par\par "
  672.     "{\b o} Select the first option to let Setup modify your "
  673.     "AUTOEXEC.BAT file\par "
  674.     "{\b o} Select the second option to view and change the changes "
  675.     "first\par "
  676.     "{\b o} Select the third option if you want to make the changes "
  677.     "yourself later on\par\par ",
  678.     "You can now view the proposed changes to the {\b AUTOEXEC.BAT} "
  679.     "file.  If the changes were not made to your satisfaction, you can "
  680.     "modify the proposed batch file by editing the file in the top "
  681.     "window.  Click on {\b OK} or press {\b Enter} to replace the "
  682.     "current batch file with the proposed one.  To return to the "
  683.     "AUTOEXEC modification options dialog, click on {\b Cancel} or press "
  684.     "{\b Esc}.", 
  685.     "Setup can save the proposed {\b AUTOEXEC.BAT} file to a file that "
  686.     "you specify.  You will have to modify your own {\b AUTOEXEC.BAT} "
  687.     "file yourself and then reboot your computer in order for the Viewer "
  688.     "to function normally.  To return to the AUTOEXEC modification "
  689.     "options dialog, click on {\b Cancel} or press {\b Esc}.")
  690.  
  691. ; Assemble and display finished message
  692.  
  693.     ;;
  694.     ;; IfIncompleteGoto (Label)
  695.     ;; ------------------------
  696.     ;; This command will branch to the label 'Label' if the installation
  697.     ;; was incomplete.  The installation is incomplete if there was an
  698.     ;; error for any file that was copied to the hard disk and the user
  699.     ;; specified to ignore the error.  The installation is also incomplete
  700.     ;; if the 'SetIncomplete' command was executed.
  701.     ;;
  702.  
  703. IfIncompleteGoto (Incomplete)
  704.     SetVariable (Message, 
  705.         "%nThe Setup program has successfully installed%n"
  706.         "the Multimedia Viewer and "<TitleName> ".%n%n")
  707.     Goto (CheckAutoexec)
  708. Incomplete:
  709.     SetVariable (Message,
  710.         "Setup has finished, but the installation was incomplete.  "
  711.         "You should correct any problems (such as insufficient disk "
  712.         "space, missing source files, or locked directories) and run "
  713.         "Setup again.%n%n")
  714.  
  715.  
  716. CheckAutoexec:
  717.  
  718.     ;;
  719.     ;; IfMustModifyGoto (Label)
  720.     ;; ------------------------
  721.     ;; This command will branch to the label 'Label' if Setup had to 
  722.     ;; modify the AUTOEXEC.BAT file, but the user chose to do the
  723.     ;; modifications themselves later.  The command will also branch
  724.     ;; if the 'SetMustModify' command was executed.
  725.     ;;
  726.  
  727. IfMustModifyGoto (MustModify)
  728.  
  729.     ;;
  730.     ;; IfMustRebootGoto (Label)
  731.     ;; ------------------------
  732.     ;; This command will branch to the label 'Label' if Setup has
  733.     ;; modified the AUTOEXEC.BAT file, and the user
  734.     ;; must now reboot the computer.  The command will also branch
  735.     ;; if the 'SetMustReboot' command was executed.
  736.     ;;
  737.  
  738. IfMustRebootGoto (MustReboot)
  739. Goto (End)
  740.  
  741.  
  742. MustModify:
  743.  
  744. SetVariable (Message, 
  745.     <Message> "Remember to modify your AUTOEXEC.BAT file and reboot your "
  746.     "computer before using the Multimedia Viewer.%n%n")
  747. Goto (End)
  748.  
  749.  
  750. MustReboot:
  751.  
  752. SetVariable (Message,
  753.     <Message> "For the changes made by Setup to come into "
  754.     "effect, you must reboot your computer.  To do this, you must first "
  755.     "exit Windows and then simultaneously hold down the Ctrl, Alt, and "
  756.     "Del keys.  You must do this before using the Multimedia Viewer.%n%n")
  757.  
  758.  
  759. End:
  760.  
  761. SetVariable (Message, 
  762.     <Message> "%nThe advantages of being a registered user are numerous.%n"
  763.     "Please send in your Product Registration Card TODAY.")
  764.  
  765.  
  766. GoTo(Exit)
  767.  
  768. NotInstalled:
  769.     SetVariable (Message,
  770.         "Setup has finished, but the installation was incomplete.  "
  771.         "You should correct any problems (such as insufficient disk "
  772.         "space, missing source files, or locked directories) and run "
  773.         "Setup again.%n%n")
  774.  
  775. Exit:
  776.  
  777. DisplayMessage (<Message>, 
  778.     "Click on {\b OK} or press {\b Enter} to return to the "
  779.     "Program Manager.")
  780.